#include "object.h"
#include "map.h"

// Constructor
CGObject::CGObject(GOType TType)
:	m_Type(TType),
	m_Deleted(false),
	m_NetworkID(-1),
	m_Map(NULL),
	m_Position(-1, -1),
	m_Direction(DIR_U)
{

}

// Destructor
CGObject::~CGObject() {

}

// Changes the object's map
void CGObject::SetMap(CGMap *TMap) {

	m_Map = TMap;
}

// Returns the object's map
CGMap *CGObject::GetMap() {

	return m_Map;
}

// Returns the object's map id
int CGObject::GetMapID() const {
	if(!m_Map)
		return 0;

	return m_Map->GetID();
}
